package java44th.group.bean.admin.vo.category;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Aurhor: 11437
 * @DATE: 2022/10/12 16:32
 * @Description:
 * @Version 1.0
 */
@NoArgsConstructor
@Data
public class ListVo {

    private int total;
    private int pages;
    private int limit;
    private int page;
    private List<ListDTO> list;

    public ListVo(int total, int pages, int limit, int page) {
        this.total = total;
        this.pages = pages;
        this.limit = limit;
        this.page = page;
    }

    @NoArgsConstructor
    @Data
    public static class ListDTO {
        private int id;
        private String name;
        private String keywords;
        private String desc;
        private String iconUrl;
        private String picUrl;
        private String level;
        private List<ChildrenDTO> children;

        public ListDTO(int id, String name, String keywords, String desc, String iconUrl, String picUrl, String level) {
            this.id = id;
            this.name = name;
            this.keywords = keywords;
            this.desc = desc;
            this.iconUrl = iconUrl;
            this.picUrl = picUrl;
            this.level = level;
        }

        @AllArgsConstructor
        @NoArgsConstructor
        @Data
        public static class ChildrenDTO {
            private int id;
            private String name;
            private String keywords;
            private String desc;
            private String iconUrl;
            private String picUrl;
            private String level;
        }
    }
}
